package shapewar.engine.ext;

import shapewar.conf.Conf;

public class Model {
	public static float[][] getDefaultTankModel(){
		float v[][] =  new float[][]{
				{-1f,1.5f},
				{1f,1.5f},
				{1f,0.5f},
				{2f,0.5f},
				{2f,-0.5f},
				{1f,-0.5f},
				{1f,-1.5f},
				{-1f,-1.5f}
		};
		for(int i=0;i<v.length;i++){
			v[i][0] *= Conf.tank_size_factor;
			v[i][1] *= Conf.tank_size_factor;
		}
		return v;
	}
	
	public static float[][] getPentaModel(int n,float r1,float r2,float rotation){
		float v[][] = new float[2*n][2];
		float theta;
		for(int i=0;i<v.length;i++) {
			theta = 1f*i/v.length * 360 * (float)Math.PI / 180;
			if(i%2==0){
				v[i][0] = r1*(float)Math.cos(theta);
				v[i][1] = r1*(float)Math.sin(theta);
			}else{
				v[i][0] = r2*(float)Math.cos(theta);
				v[i][1] = r2*(float)Math.sin(theta);
			}
			v[i][0] *= Conf.SIZE;
			v[i][1] *= Conf.SIZE;
		}
		return v;
	}
	
}
